########################################################################
#
#       ORIGIN:     FUYONG .
#       GROUP:      
#       PROJECT:    USED FOR GCC Makefile
#       DATE:       April 2009.
#       PURPOSE:    Standard application makefile
#                   
#       NOTE:       This include makefile assumes the source modules
#                   are organised into the linux directory structure.
#
#       $Revision: $
#       $Date: 7-Jan-2009.09:35:44 $ 
########################################################################

TARGET_APP = $(OUT_DIR)/app

########################################################################

include $(PROJECT_DIR)/config/plantform.mk

########################################################################
C_SOURCE += main.c
CFLAGS += -lgtapp
########################################################################
C_OBJECT = $(patsubst %.c,$(OUT_DIR)/%.o,$(C_SOURCE))
CPP_OBJECT = $(patsubst %.cpp,$(OUT_DIR)/%.o,$(CPP_SOURCE))

$(OUT_DIR)/%.o:%.c
	$(CC) $(CFLAGS)  -c -g $< -o $@ $(INCLUDES) $(PROJ_CPL_MACRO)

$(OUT_DIR)/%.o:%.cpp
	$(CPP) $(CFLAGS) $(CPPFLAGS) -c -g $< -o $@ $(INCLUDES) $(PROJ_CPL_MACRO)	

all:$(TARGET_APP)

clean:
	rm -rf $(TARGET_APP)
	rm -rf $(C_OBJECT) $(CPP_OBJECT)
$(TARGET_APP):$(CPP_OBJECT) $(C_OBJECT)
	$(CC) -o $@ -g $(CPP_OBJECT) $(C_OBJECT) $(LIB_DIR) $(CFLAGS) $(LDFLAGS) -Wl,--start-group $(LIBS) -Wl,--end-group
	rm -rf $(C_OBJECT) $(CPP_OBJECT)
#	cp $(TARGET_APP) /mnt/sdb/sdb/HI3716C/Hi3716MV100R001C00SPC050/sample/fb